Pulse test of digital control system

ABSTRACT

In a direct digital control system, a pulse test method is provided for computing data which can be employed to revise tuning coefficients used in the process model. On initiation of the test, the direct digital control operation is suspended and the controlled variable is pulsed. Revised tuning coefficients of the mathematical model defining the control loop are computed from detected changes in the measured variable. These coefficients can be inserted into the control loop model to provide more accurate process control.

States Patent [191 Pemberton [451 Apr. 10,1973

[54] PULSE TEST OF DIGITAL CONTROL SYSTEM [75] Inventor: Troy J.Pemberton, Bartlesville,

Okla.

[73] Assignee: Phillips Petroleum Company, Bartlesville, Okla.

[22] Filed: June 3, 1971 [21] Appl. No.: 149,583

[52] US. Cl ..235/l50.1 [51] ...G06f 15/46, G05b 17/02 [58] Field ofSearch ..235/l50.1; 444/1 [56] References Cited UNITED STATES PATENTS3,621,217 11/1971 Carr et a1. ..235/150.l

Primary Examiner-Eugene G. Botz Attorney-Young and Quigg 7] ABSTRACT Ina direct digital control system, a pulse test method is provided forcomputing data which can be employed to revise tuning coefficients usedin the process model. On initiation of the test, the direct digitalcontrol operation is suspended and the controlled variable is pulsed.Revised tuning coefficients of the mathematical model defining thecontrol loop are computed from detected changes in the measuredvariable. These coefficients can be inserted into the control loop modelto provide more accurate process control.

3 Claims, 7 Drawing Figures PHASE INDlCATO ENTER PHASE I PHASE 2 PHASE 3OF PuLsE OF PULSE OF PuLsE TEST TEST TEST NO Q NO YES YES DEFINE DEFINEDE INE- AND T(+)- AND Tu AND THO) PHAsE=2 PHASE 3 v CALCULATE y y MODEL1 PARAMETERS RETURN CALL CONTROLLER TUNING ROUTINE FIG 3 0 TO AcONvERTER REcORDER 22 c': C l 40 INVENTOR.

T. J. PEMBERTON ,4 TTOANEVS PULSE TEST OF DIGITAL CONTROL SYSTEMIncreasing use is being made of digital computers in automatic controloperations. The use of high speed digital computers enables controlsystems to be realized which require relatively complex equations todescribe the necessary control action. In order to design such automaticcontrol systems it is necessary to establish mathematical models whichcorrelate changes in input variables with the necessary control actionto be performed. It has been found that many processes, particularlythose in the chemical and petroleum industries, can be described to aclose approximation by the transfer function (Output/Input)(s) Ke'"l(i',sl-l )(1' s+l) (l) where s is the Laplace operator and K, 7,, 1-,and r, are model parameter constants. This transfer function defines amodel having second order lag plus dead time. The parameters K, 15,, 1-and 1- are established initially from a study of the effect that changesin process conditions have on a measured variable. The values of theseparameters can be derived empirically by curve fitting procedures basedon measured data.

Unfortunately, many processes change over a periodof time so that theinitially established parameters do not continue to describe the processaccurately. For example, in a heat exchange process, the gradualaccumulation of scale on heat exchange tubes can reduce the heattransfer properties of the tubes. In a chemical reaction, the activityof a catalyst may decrease over a period of time. In both of theseexamples, the necessary control equation must be changed with time.

This invention provides a system for computing updated parameters formathematical models employed in automatic control processes. Acontrolled variable of the process is pulsed, and the first and secondderivative of a measured variable are calculated following theapplication of the pulse. In response to these derivatives, calculationsare made of updated parameters to be employed in an equation whichdefines the mathematical model of the control system. These revisedparameters can be inserted into the control system automatically ifdesired.

In the accompanyingdrawing,

FIG. 1 is a schematic representation of a heat exchange systemcontrolled by a direct digital control system.

FIGS. 2a to 2d are graphical representations of signals obtainedinaccordance with the process of this invention.

FIG. 3 is a logic flow diagram for a computer program employed in thepulsed system of this invention.

FIG. 4 is a schematic illustration of analog equipment which can beutilized to establish parameters of the mathematical model.

Referring now to the drawing in detail and to FIG. 1 in particular,there is shown a schematic representation of a heat exchange system. Awarm fluid to be cooled is introduced into a heat exchange vesselthrough an inlet conduit 11. Cooled fluid is removed through an outletconduit 12. A coil 13 is disposed within vessel 10, and coolantisintroduced, into the coil through a conduit 14 which has a pneumaticallyoperated control valve 15 therein. A temperature sensing element isdisposed in conduit 12 to measure the temperature of the cooled fluid.removed from vessel 10. A transmitter 17 is connected to the temperaturesensing element to establish an output signal 0 which is representativeof the measured temperature. This signal, which is in analog form, istransmitted to the input of an analog-todigital converter 20. Acorresponding signal in digital form is transmitted to a digitalcomputer 21. Computer 21 is programmed in accordance with a mathematicalmodel which describes the operation of the control system. This computerestablishes an output signal which represents any change which may benecessary in the rate of flow of coolant through coil 13 in order tomaintain the cooled fluid at a desired temperature. The output signalfrom computer 21 is applied to a digitalto-analog converter 22 whichestablishes a corresponding output electrical signal. This signal isapplied to a transducer 23 which establishes a pneumatic signalrepresentative of the input electrical signal. The pneumatic signal isapplied to regulate valve 15. If an electrical control valve isemployed, transducer 23 can be eliminated.

The apparatus thus far described constitutes a conventional control looputilizing a computer to regulate the setting of a controlled variable inresponse to changes in a measured variable. In one specific examplewhich demonstrates the operation of the pulse test method of thisinvention, a heat exchange system of the type shown in FIG. 1 can becontrolled when computer 21 is programmed in accordance with thefollowing mathematical model:

AM n a 2) (PF'C1)+ (AT/T!) f' z) (712/ r- 2) r- 1) o o) l (2) P setpointvalue 2 samples previous to P C measured temp 2 samples previous to Cwhere AM is the incremental change in controller output, K, is theproportional gain of the algorithm, 1-, is reset time, 1-,; is ratetime, p is the latest set point value, p is the set point value onesample previous, C is the measured temperature at the latest sample, andC is the measured temperature one sample previous. The C values canrepresent actual measured values or averages of several measured values.For example, C can represent the average of the latest five measuredvalues, and C, can represent the average of the five measured valuesimmediately preceding the latest value.

The first step in the operation of this invention is to remove theautomatic control from the system. An input signal can be introducedinto the computer for this purpose by an operator, or the computer canbe programmed to perform the pulse test periodically. After automaticcontrol is removed, a pulsed output signal from the computer isgenerated. This can be in the form of a rectangular pulse 30 ofamplitude A, as illustrated in FIG. 2a. Such a pulse changes theposition of control valve 15 of FIG. 1 abruptly by an amountrepresentative of amplitude A. The resulting change of flow of coolantthrough coil 13 changes the temperature of the fluid being heated sothat a temperature change is soon detected in outlet conduit 12. Forexample, if the pulse applied to valve 15 moves the valve toward aclosed position, the measured temperature C tends to increase, as shownby the curve 3l'of FIG. 2b. Curves 32 and 33 in FIGS. 20 and 2drepresent the first (E) and second t derivatives, respectively, of thecurve 31 of FIG. 2b with respect to time. These derivatives are utilizedin accordance with the present inven- Using these definitions along withEquations (8) and tion to compute new parameters for the analog model.(1 1 there is obtained:

The mathematical model of Equation (1) can be expressed in the timedomain X(t) by the equation '0 "'d "z 5 1'rz )+(1',+r )c(t)+c(t)=KX(tr(3) Fifi where r, and 7 are the major process time constants, r 1 i isthe apparent or true dead time, K is the steady-state a m f 13 gain, andt is time. As represented in FIG. 2a for a sina c gle-sided pulse 30, 10and o)] (4) -g E where U(t) isO fort s 0 and is 1 fort 0, and U(tt,,) a2 In l-a is 0 fort 5 t and is 1 for t t The time at which the 2 pulse 30is terminated is labeled t,,. This is the time at which (t) is amaximum.

Equation (4) describes a rectangular pulse of By substituting Equations12) to (14) into Equations nitude A, beginning at t equal zero andending at t (8) andullthel'e obtamed: equal t By substituting Equation(4) into Equation (3), there is obtained the solution. i a 1-a u)=KA+KA((t-m) 1 & (15) a r T c (t)=KA[1+ c 100- 1 2 1 25 (g lfi a m 1 r a is r,I (16) for r t 5 t The term a is defined as the ratio .i :2 L L a='r,/rand 0 a l. (6) )=KA 1 -fl n l-a( a 1-a For t t,,, another term must beadded to Equation (5 0 i 1 1a -r 1-a 7) M 1 i i c (t)=KA[1+ i e c :lU(tt1 1a 1-a By combining Equations (5) and (7) the entire solu- CUO =JuKA aa tron lS given as 40 1 a g 1( 2( (8) and Similarly Equations (12) to(19) form a set of eight equations in four unknowns, namely K, 1,, 7 andr,,. The quantities and o), m), D'), E00), 00'), o, m and o are servedduring the execution of the pulse test, hence are available for use.

6 (3) 1,) formula for K is obtained:

i lap A 0%) 1 .*W finally,

. i F E t' 16, 18 d 19 f t c(t)=cl(t) cz(t) (H) lartoiliKqgigggriilqdl)an )adi feren formu Three different times during the test areimportant. These are r,,, t,,,, and t a. They are defined by the fol-[C(tM) uo 5 (2|) lowmgi I Equations 12) to 14) can be combined to give tE t such that c(t,,) a maximum t,,, E tsuch that c(t,,,)=amaximum r,,=t+l,,, t 22 and Two model parameters, 1, and 1 remain to be detert, E tsuch that (t a minimum mined.

a=27 [c(t.,)/KA 23 with K and a determined, Equation (12) can be used tocompute r 2=[( ..n) a v (2 By combining Equations (12) and (15)graphically to eliminate a, 1 can be expressed as a function of the termKA/c(t,,). For practical purposes the true curve is adequately describedby the equation 1' E [0.925 KA/c(t 2.3] [t,, t Finally Equations or(21), (22), (25) and (26) form a set of four formulas that can be usedto compute directly from observed data a value for each of the modelparameters. These equations can be solved by digital computer 21 ofFIG. 1. A logic flow diagram of a suitable pulse test routine isillustrated in FIG. 3. At the beginning of the pulse test, an elapsedtime counter within the computer is set to zero. Following computationof 5, the subsequent calculations can follow one of three branchesdepending on the particular index which has been set. Index No. 1represents the time from the beginning of the test to t Index No. 2represents time from t to t,,,; and Index No. 3 represents the period oftime from r to t During Index No. l, a determination is made of themaximum value of 3. At this time, the reading of an elapsed time counterrepresents t The quantity c(t,,) is set to the last sample value of cand the quantity c'(t,,) is set to the last calculated value of e andthe pulse is removed. The index is then set to No. 2. If a two-sidedpulse is employed, in the manner to be described, a reversepolarity'pulse is then applied. During Index No. 2, a determination ismade of the time that 6 becomes equal to or less than zero. When thisoccurs, the reading of the elapsed time counter is representative of 2and c(t,,,) is set to last sample value of 0. Index No. 3 is then set.During Index No. 3, a determination is made of the time at which 6reaches a minimum. When this occurs, the reading of the elapsed timecounter is representative of t (t,') and c(t.,) are set to lastdetermined values of and 0. At this time the computer calculates thevalues of K, 1-,, 'r, and 'r,,, from the equations described above. Thiscompletes the pulse testing operation, and automatic process control bymeans of the computer is then restored.

As previously mentioned, a two-sided pulse 30' of the type illustratedin FIG. 2a can be employed in place of single sided pulse 30. Thisresults in curves of the general configurations of the curves 31 32' and33 of FIGS. 2b, 2c and 2d. Corresponding equations can be derived tocompute the parameters of the mathematical model. The two-sided pulse ofFIG. 2a can be described by the equation:

x(t)=A [U(:)-2U(r:,)+U(t-z,')] (27) Equations (5), (6), (7), (9), (l2),(l5) and (I8) apply to this case without modification. However, beforederiving the equations for c(t,,,), c(t,), my t and t a term must bemodified in Equations (8) and (11). This yields r( 2( and '.(r) 2( (29)With t t,,,, t and r defined as before,

L 12 an 1-2a e l-a *TI;

and

Z3 1-2 1-8 (mi-1%ln 12a e" (31) Upon substituting Equations (30) and(31) into (28) and 29) the following formulas are obtained:

Equations (l2), (l5), (l8) and (30) to (34) form a set of eightequations in the four unknown model parameters. As before, some of theseequations may be combined. From Equations (15), (32) and (33) Bycombining Equations (12), (30) and (31) the formula for 1- is found tobe d a+ m o (the same as for the single-sided pulse). The formulas forr, and 1- are also the same for either type pulse. Therefore, changingthe pulse from one-sided to twosided affects only the formula for K.

With the parameters computed by the abovedescribed equations, it ispossible to compute new constants for the control algorithm of Equation(2). This can be accomplished by the following equations: 1 K (.8051.15:1 96a r -(1.323 .0480 .0715 In T4) (38) TI: 4.724 .2790 190 Ta(.518 .OIOSG .0938 III T4) TR -(IA 3.0811 3.1241 Ta (-.095 .7140.006511l T4) where K, K /K; r, T, (r, 'r, r

and T =T /(T +1'2'l'74) Equations (38), (39) and (40) are derived by theprocedures described in Instrumentation Technology, February 1968, pages65 to 70 and in a thesis entitled Design of a Learning System forBang-Bang Control of a Second Order Process with Variable ProcessParameters," J. F. Steadman, Purdue University, January 1969. Equations(38), (39 and (40) can be solved by computer 21 immediately after thevalues of K, r r, and 1-,, are computed. The parameters so computed canthen be inserted into the process control algorithm originallyprogrammed into the computer to provide an updated algorithm. Thisresults in an automatic self-tuning control system.

As an alternative, calculations can be made by less complexrelationships as follows:

and

The calculations described above are advantageously made by programmingcomputer 21 to carry out the operations of FIG. 3. This is usually themost practical procedure because the computer is available in theautomatic control system being tested. However, it is not necessary touse a digital computer for this operation. The apparatus illustrated inFIG. 4 can be employed to establish signals which provide the necessaryinformation to make the computations. The analog signal from converter22 can be applied to the first channel of a conventional recorder 40.This establishes a signal of the type illustrated in FIG. 2a. The outputsignal c from transducer 17 is applied to a second channel of recorder40 to provide a signal corresponding to that shown in FIG. 2b. Signal cis also applied to the input of a differentiating circuit 41, the outputof which is representative of 6. Signal is applied to the input of asecond differentiating circuit 42. Signals c' and c from circuits 41 and42 are applied to respective third and fourth channels of recorder 40.These signals correspond to those shown in FIGS. 2c and 2d.

The data necessary to solve equations (20) or (21 (22), (25) and (26)can be obtained directly from the recorded signals on recorder 40. Thesedata permit the calculations to be made manually if desired. The updatedparameters can then be inserted into computer 21 when automatic controlis restored.

While this invention has been described in con unction with presentlypreferred embodiments, it obviously is not limited thereto.

What is claimed is:

1. In a process in which a process variable is manipulated by a controlmeans in response to a measurement of a process condition in accordancewith a mathemati cal model in the time domain X (t) which isrepresentative of the expression where t is time, c is said measurement,c' is the first derivative of c with respect to time, 6 is the secondderivative of c with respect to time, 1', and 1 are time constants, 1,,is dead time, and K is a constant; the method of obtaining data whichcan be employed to revise the mathematical model to compensate forchanges in the process, which method comprises:

removing the control means from control of the process; applying a pulseof preselected amplitude to said process variable to cause a change insaid process condition;

measuring said process condition and establishing a first signalrepresentative thereof;

establishing a second signal which is representative of the firstderivative of said first signal with respect to time; removing saidpulse from said process variable when said second signal reaches amaximum value; and

establishing a third signal which is representative of the secondderivative of said first signal with respect to time, said establishedsignals providing infonnation which can be employed to update saidmathematical model.

2. The method of claim 1, further comprising applying a second pulse ofpolarity opposite the polarity of said first pulse to said processvariable at the time the first mentioned pulse is removed, and removingsaid second pulse when said second signal reaches a minimum value.

3. The method of claim 1, further comprising computing constants forsaid mathematical model from said established signals.

* i i II! i

1. In a process in which a process variable is manipulated by a controlmeans in response to a measurement of a process condition in accordancewith a mathematical model in the time domain X(t) which isrepresentative of the expression Tau 1 Tau 2 c(t) + ( Tau 1 + Tau 2)c(t) + c(t) KX(t- Tau d) where t is time, c is said measurement, c isthe first derivative of c with respect to time, c is the secondderivative of c with respect to time, Tau 1 and Tau 2 are timeconstants, Tau d is dead time, and K is a constant; the method ofobtaining data which can be employed to revise the mathematical model tocompensate for changes in the process, which method comprises: removingthe control means from control of the process; applying a pulse ofpreselected amplitude to said process variable to cause a change in saidprocess condition; measuring said process condition and establishing afirst signal representative thereof; establishing a second signal whichis representative of the first derivative of said first signal withrespect to time; removing said pulse from said process variable whensaid second signal reaches a maximum value; and establishing a thirdsignal which is representative of the second derivative of said firstsignal with respect to time, said established signals providinginformation which can be employed to update said mathematical model. 2.The method of claim 1, further comprising applying a second pulse ofpolarity opposite the polarity of said first pulse to said processvariable at the time the first mentioned pulse is removed, and removingsaid second pulse when said second signal reaches a minimum value. 3.The method of claim 1, further comprising computing constants for saidmathematical model from said established signals.